package com.genexususa.eo.google.test.criterion;


import com.genexususa.eo.google.connection.CampaignCriterionManager;
import com.genexususa.eo.google.connection.CampaignManager;
import com.genexususa.eo.google.connection.LocationCriterionManager;
import com.genexususa.eo.google.data.LocationReport;
import com.genexususa.eo.google.test.Constants;
import com.google.api.ads.adwords.axis.v201406.cm.LocationCriterion;

import java.util.ArrayList;

public class ConsumeCreateCriterion {

    public static void main(String[] args){

        String xml = "<GA_CriterionCollection xmlns=\"Revenew\">\n" +
                "\t<GA_Criterion xmlns=\"Revenew\">\n" +
                "\t\t<CampaignID>" + Constants.testCampaignEmiliano1 + "</CampaignID>\n" +
                "\t\t<CampaignGxId>123456</CampaignGxId>\n" +
                "\t\t<CriterionGxId>0</CriterionGxId>\n" +
                "\t\t<CriterionId>0</CriterionId>\n" +
                "\t\t<IsNegative>true</IsNegative>\n" +
                /*"\t\t<IpBlock>\n" +
                "\t\t\t<IpAddress>123.123.244.124</IpAddress>\n" +
                "\t\t</IpBlock>\n" +*/
                /*"\t\t<AdSchedule>\n" +
                "\t\t\t<DayOfWeek>TU</DayOfWeek>\n" +
                "\t\t\t<StartHour>0</StartHour>\n" +
                "\t\t\t<StartMinute>0</StartMinute>\n" +
                "\t\t\t<EndHour>6</EndHour>\n" +
                "\t\t\t<EndMinute>45</EndMinute>\n" +
                "\t\t</AdSchedule>\n" +*/
                "\t\t<Location>\n" +
                "\t\t\t<LocationName>60602</LocationName>\n" +
                "\t\t\t<DisplayType>Postal Code</DisplayType>\n" +
                "\t\t</Location>\n" +
                "\t</GA_Criterion>\n" +
                "</GA_CriterionCollection>";
        CampaignCriterionManager cpm = new CampaignCriterionManager();
        cpm.SetClientId(Constants.testAccountEmiliano);

        String res = cpm.CreateCampaignCriterion(xml);
        //cpm.DeleteCampaignCriterion(221158047L,111968585767L);

        cpm.Finalize();
    }
}
